<style>
.unit label{
	width:125px;
}
</style>
<script type="text/javascript">
	function tijiao(form, navTabId) {
		var $form = $(form);
		if (form[DWZ.pageInfo.pageNum])
			form[DWZ.pageInfo.pageNum].value = 1;
		$.pdialog.closeCurrent();
		navTab.reload($form.attr('action'), {
			data : $form.serializeArray(),
			navTabId : navTabId
		});
		return false;
	}
	function showcar()
	{
		var carstat=document.getElementById("carstat");
		var addcustomer=document.getElementById("addcustomer");
		if(carstat.checked){
			addcustomer.style.display='block';
		}else{
			addcustomer.style.display='none';
		}
		
	}
</script>
<div class="pageContent">
	<form method="post" action="__URL__/insert/id/{$id}/navTabId/__MODULE__/callbackType/closeCurrent" class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone);">
	    <input type="hidden" name="user_id" value="<?php echo $_SESSION[C('USER_AUTH_KEY')] ?>"/>        
        <input type="hidden" name="unloadname" value="{$Think.session.loginUserName}"/>	   
        <div class="pageFormContent" layoutH="56">
			<!-- 
			<div class="unit">
				<label style="width: 200px;">接车人：</label>
				<input name="unloadname" value="{$Think.session.loginUserName}" readonly/>
			</div> -->
			<div class="unit">
				<label style="width: 200px;">卸货时间：</label>
				<input type="text" name="unloadtime" class="date" dateFmt="yyyy-MM-dd HH:mm"/>
				<a class="inputDateButton" href="javascript:;">选择</a>
			</div>
			
			<div class="unit">
				<label style="width: 200px;">客户卸货净重(吨)：</label>
				<input name="eweight" type="text"/>
			</div>
			<div class="unit">
				<label style="width: 200px;">运费结算净重(吨)：</label>
				<input name="seteweight" type="text"/>
			</div> 
			<div class="unit">
			<label style="margin-right: -10px;">本车次下个客户</label>
			<input name="carstat" id="carstat" type="checkbox" value="1" onclick="showcar();"/>
			</div>
			<div id = "addcustomer" style="display:none">
			<div class = "unit">
			<label style="margin-right: -10px;">客户：</label>
					<select name="contractlogid" id="contractlogid" class=" combox">
						<option value="" selected>请选择(必填)</option>
						<volist name="list4" id="vo">
						<option value="{$vo.id},{$vo.secondid}">{$vo.secondname}
						<eq name="vo.iscommon" value="0"><td style="color:red">-正常审批</eq>
				        <eq name="vo.iscommon" value="1"><td style="color:green">-款到卸车</eq>
				        <eq name="vo.iscommon" value="2"><td style="color:orange">-特殊审批</eq>
						</option>
						</volist>
					</select>
			</div>
			<div>
			<label style="margin-right: -10px;">接车人：</label> 
				<select name="userid" class=" combox">
					<option value="" selected>请选择(必填)</option>
					<volist name="user" id="vo">
					<option value="{$vo.fullname}">{$vo.fullname}</option>
					</volist>
				</select>
			</div>
			<p class="unit">
				<label style="margin-right: -10px;">起运地：</label> 
				<select name="start" class=" combox">
					<option value="" selected>请选择(必填)</option>
					<volist name="freight" id="vo">
					<option value="{$vo.startaddress}">{$vo.startaddress}</option>
					</volist>
				</select>
			</p>
			<p class="unit">
				<label style="margin-right: -10px;">目的地：</label> 
				<select name="destination" class=" combox">
					<option value="" selected>请选择(必填)</option>
					<volist name="end" id="vo">
					<option value="{$vo.endaddress}">{$vo.endaddress}</option>
					</volist>
				</select>
			</p>
			<div class="unit">
				<label>备注：</label>
				<TEXTAREA name="note" rows="3" cols="56" style="width: 360px;"></textarea>
			</div>
			</div>
		</div>
		<div class="formBar">
			<ul>
				<li><div class="buttonActive"><div 
				class="buttonContent"><button type="submit">提交</button></div></div></li>
				<li>
					<div class="button"><div 
				class="buttonContent"><button type="button" class="close">取消</button></div></div>
				</li>
			</ul>
		</div>
	</form>
</div>
